package flyman.comutil.util;

import java.lang.reflect.Method;
import java.util.Map;

public class ObjectUtil {
	public static Object getPropValue(Object obj,String prop)throws Exception{
		if(obj instanceof Map){
			return ((Map)obj).get(prop);
		}
		Class cc=obj.getClass();
		Method method=null;
		method =cc.getMethod("get"+prop.substring(0, 1).toUpperCase()+prop.substring(1),null);
		return method.invoke(obj, null);
	}
	public static Map jsonStrToMap(String jsonStr){
		return null;
	}
}
